<?php

class Public_Comment_ApproveSuccessView extends BlogPublicBaseView
{
	public function executeHtml(AgaviRequestDataHolder $rd)
	{
        $return_url = $rd->getParameter('return_url');
        if ($return_url !== FALSE) {
            $this->getResponse()->setRedirect($return_url);
        } else {
    	    $ro = $this->getContext()->getRouting();
    	    $comment_id = $rd->getParameter('comment_id');
            $route_elements = $this->getAttribute('post_coordinates');
            $url = $ro->gen('post.view', $route_elements) . '#c' . $comment_id;
            $this->getResponse()->setRedirect($url);
        }
	}
}

?>